<!DOCTYPE html>
<html>
    <head>
        <style>
            div #block {
                position:absolute;
                background-color:#abc;
                width:90px;
                height:90px;
                margin:5px;
            }
            
            #content{
                position: absolute;
            }
        </style>
        <script>
            var img=new Image();
            img.src="<?php echo $_Q_Url->_base()->url; ?>pages/html5/images/preview.jpg";
            var img_width = document.getElementById("img").width;
            var img_height = document.getElementById("img").height;
        </script>
    </head>
    <body>
        <div id="content">
            <div class="block" id="block"><img id="img" src="<?php echo $_Q_Url->_base()->url; ?>pages/move/images/preview.jpg" /></div>
        </div>

        <script>
            function run(){
            $("#block").css("left", -img_width);
            $("#block").css("top", img_height);
            $("#block").css("width", img_width);
            $("#block").css("height", img_height);
            $("#content").css("left", "0px");
            $("#content").css("top", 0);
            $("#content").css("width", img_width);
            $("#content").css("height", img_height);
            $(".block").animate({"left": "+=" + img_width + "px","top": "-=" + img_height + "px"}, "slow");
            }
            run();
        </script>

    </body>
</html>